<!-- MapControlsProvider.vue -->
<template>
  <slot></slot>
</template>

<script setup>
import { provide, watch } from "vue";

const props = defineProps({
  map: {
    type: Object,
    required: true
  }
});

watch(() => props.map, (newVal, oldVal) => {

})

// 提供地图实例给子组件
provide('amap', props.map);
</script>